<template>
  <el-card>
    <h3>单位管理</h3>
    <el-table :data="units" style="width: 100%">
      <el-table-column prop="code" label="单位编号" />
      <el-table-column prop="name" label="单位名称" />
      <el-table-column prop="contact" label="联系人" />
      <el-table-column prop="phone" label="联系电话" />
      <el-table-column label="操作">
        <template slot-scope="scope">
          <el-button type="primary" size="mini" @click="saveUnit(scope.row)">保存</el-button>
        </template>
      </el-table-column>
    </el-table>
  </el-card>
</template>

<script>
export default {
  name: "Dwgl",
  data() {
    return {
      units: [
        { code: "DW001", name: "第一单位", contact: "李经理", phone: "13800000001" },
        { code: "DW002", name: "第二单位", contact: "王主管", phone: "13800000002" },
      ],
    };
  },
  methods: {
    saveUnit(row) {
      this.$message.success(`单位“${row.name}”已保存（模拟）`);
    },
  },
};
</script> 